package com.chenxin.quartz.task.qms;

import com.chenxin.interact.domain.UrlMap;
import com.chenxin.interact.service.IUrlMapService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 成品出库检验
 */
@Component("productQualityTask")
@Slf4j
public class ProductQualityTask {
    @Autowired
    private IUrlMapService urlMapService;
    public void qualityRequest(){
        // 0.判断对用的URL是否在[wms_url_map]表中进行配置
        UrlMap bomUrl = urlMapService.selectUrlMapByUrlNo("PROD_QA");
        if (bomUrl == null) {
            log.error("[PROD_QA]未在表[wms_url_map]中进行配置!请核查");
            return;
        }
        // 1.调用QMS接口发送质检请求
        log.info("出库质检数据上报完成!");
    }
}
